package com.wis.mapper;

import com.wis.entity.CourseEntity;
import com.wis.entity.UserEntity;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface UserMapper {
    // 查询用户信息
    @Select("SELECT * FROM user")
    List<UserEntity> selectAll();

    //搜索用户
    @Select("SELECT * FROM user WHERE name LIKE CONCAT('%', #{name}, '%') AND type = #{type} LIMIT #{offset}, #{limit}")
    List<UserEntity> selectByName(@Param("name") String name, @Param("type") Integer type, @Param("offset") int offset, @Param("limit") int limit);
}
